#ifndef BINDING_H
#define BINDING_H

#include "../types/wfnettypes.h"

#include <coretypes.h>

#include <QtCore/QHash>

namespace core
{
class ValueType;
}

namespace wfnet
{

class Binding
{
public:
    Binding();
    Binding(const Binding& binding);
    ~Binding();

    Binding& operator=(const Binding& other);

    void addBoundVariable(const VariableName& variable,
        const core::ValueType& value);
    void removeBoundVariable(const VariableName& variable);
    void clear();

    bool contains(const VariableName& variable) const;
    const core::ValueType* getValue(const VariableName& variable) const;

    int size() const;

private:
    QHash<VariableName, core::ValueType* > m_boundVariables;
};

}

#endif
